<template>
  <div class="tpl20-bottom">
    <div
      class="modulePadding"
      :style="`padding-top:${tplItemData.modulePadding}px;padding-bottom:${tplItemData.modulePadding}px;`">
      <div class="homeCnav20">
        <div class="homeCnavbox20">
          <ul>
            <li v-for="(item,index) in tplItemData.dataset" :key="index">
              <a @click="openLink(item.link)">
                <img :src="item.pic">
                <h2 :style="`color:${item.titleColor}`">{{ item.showtitle }}</h2>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { openPage } from '@/utils/utils'
export default Vue.extend({
  props: {
    tplItemData: {
      type: Object // 传入参数的类型
    }
  },
  methods: {
    // TODO 小程序跳转
    openLink(link) {
        openPage(link)
    }
  }
})
</script>

<style lang="scss">
.tpl20-bottom{
  .homeCnav20{
    ul{
      display:flex;
      display:-webkit-box;
      display:-webkit-flex;
      -webkit-justify-content:space-between;
      -moz-justify-content:space-between;
      justify-content:space-between;
      li{
        /* float: left; */
        position:relative;
        width:130px;
        height:130px;
        border:2px solid #a2c777;
        text-align: center;
        // width:22%;
        border-radius:50%;
        box-sizing:border-box;
        -webkit-box-sizing: border-box;
        &:last-child{
          margin-right:0;
          &:after{
            display:none;
          }
        }
        &:after{
          position:absolute;
          right:-20px;
          top:0;
          bottom:0;
          margin:auto;
          content:"";
          width:8px;
          height:8px;
          border-radius:50%;
          background:#a2c777;
        }
        a{
          display:block;
          width:100%;
          height:100%;
          padding-top:30px;
          box-sizing: border-box;
          -webkit-box-sizing: border-box;
          img{
            display: block;
            width: 40px;
            height: 40px;
            margin:0 auto;
          }
          h2{
            font-size:24px;
            color:#a2c777;
            line-height:1.8;
          }
        }
      }
    }
  }
}
</style>
